
//
//  RNOLMyRedBagListContainerViewController.m
//  RongNiuOnline
//
//  Created by apple on 2018/4/25.
//  Copyright © 2018年 rongniu. All rights reserved.
//

#import "RNOLMyRedBagListContainerViewController.h"
#import "RNOLMyRedBagCardListViewController.h"

@interface RNOLMyRedBagListContainerViewController ()



@end

@implementation RNOLMyRedBagListContainerViewController


- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = kBgColor;
    self.minYPullUp = 0;
    self.maxYPullDown = 0;
}

/**
 控制器继承 SPCoverController
 此方法返回的是标题栏 标题
 */
- (NSString *)titleForIndex:(NSInteger)index
{
    return @[@"可用红包",@"已用红包",@"过期红包"][index];
}

- (CGFloat)tabWidthForIndex:(NSInteger)index{
    return KWIDTH/3.0;
}

/**
 下面联动的ChildController控制器的数量
 */
- (NSInteger)numberOfControllers
{
    return 3;
}

- (CoverScrollStyle)preferCoverStyle{
    return CoverScrollStyleTop;
}

- (CGFloat)preferTabY{
    return 0;
}

/**
 下面联动的ChildController控制器
 */
- (UIViewController *)controllerAtIndex:(NSInteger)index
{
    RNOLMyRedBagCardListViewController *coverController = [[RNOLMyRedBagCardListViewController alloc] init];
    coverController.view.frame = [self preferPageFrame];
    RNOLGiftCertificationType type = (RNOLGiftCertificationType)(1 - index );
    coverController.type = type;
    return coverController;
}

//页面切换已在SPTabcontroller 实现
- (void)didPressTabForIndex:(NSInteger)index{
    [super didPressTabForIndex: index];
    
}

//横向滑动
- (void)scrollViewContentOffsetWithRatio:(CGFloat)ratio draging:(BOOL)draging{
    [super scrollViewContentOffsetWithRatio:ratio draging:draging];
    
}


@end
